<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <script src='../js/旧版本/react.development.js'></script>
    <script src='../js/旧版本/react-dom.development.js'></script>
    <script src='../js/旧版本/babel.min.js'></script>
</head>

<body>
    <div id="test"></div>
    <script type='text/babel'>
        class MyComponent extends React.Component {
            render() {
                console.log(this)
                return <h1>这是通过类创建的组件</h1>
            }
        }
        ReactDOM.render(<MyComponent />, document.querySelector('#test'))
    </script>
</body>

</html>